package com.prx.producerandconsumer;

public class TestDemo {
    public static void main(String[] args) {
        //创建一个仓库
        MyStack myStack = new MyStack(10);
        //创建生产者消费线程
        Thread thread = new Producer(myStack);
        //创建消费者线程
        Thread thread1 = new Consumer(myStack);
        //启动线程
        thread.start();
        thread1.start();
    }
}
